package com.ag.oa.core.service.impl;

import com.ag.oa.core.dao.IQuestionDao;
import com.ag.oa.core.entity.vo.QuestionVO;
import com.ag.oa.core.service.IQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("questionServiceImpl")
public class QuestionServiceImpl implements IQuestionService {

    @Autowired
    private IQuestionDao questionDao;

    @Override
    public List<QuestionVO> getOneQuestionRandom() {
        return questionDao.getOneQuestion();
    }

    @Override
    public QuestionVO getOneQuestionRandomLy() {
        return questionDao.getOneQuestionObject();
    }

    @Override
    public void addOneQuestion(String id, String uploader, String source, Integer type, Integer score, String content) {
        questionDao.addOneQuestionObject(id, uploader, source, type, score, content);
    }


}
